home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ham Radio
/
Ham Radio CD-ROM (Emerald Software) (1995).ISO
/
misc
/
daytime
/
daytime.doc
< prev
Wrap
Text File
|
1988-08-29
|
7KB
|
156 lines
DAYTIME
Copyright (c) 1988
By :Richard Tashner N2EO
163-34 21 Road
Whitestone New York 11357
Daytime.asm is written in Intel 8088 assembly language
and is intended to be used with the IBM PC/XT/AT and most
compatibles.
The ARC file you just downloaded contains three files.
1 - DAYTIME.CMD ( The executable program )
2 - DAYTIME.ASM ( The source code )
3 - DAYTIME.DOC ( This file )
This program has been tested with the A.E.A. PK-232 and
should work with most if not all TAPR clones as well.
DAYTIME.COM will set the real time clock contained in the TNC
to the proper date and time and display the values on the
screen.
This is useful as each time the TNC is turned off at the
end of a packet session the data in the TNC,s real time clock
is lost.
You can load DAYTIME.COM and a program such as YAPP.COM
from a batch file. In this way you automatically set the
TNC.s clock each time you enter your packet communication
program.
Just be sure and load DAYTIME.COM first then your
communications program (such as YAPP) second.
Sample Batch file
-----------------
The following example batch file shows how to configure
DAYTIME.COM to automatically load with YAPP.COM... Please note everything
shown within the < > are the commands used to write the batch file and are not
actually entered into the batch file... Do not type in the < >!!
<COPY CON YAPP.BAT> <ENTER>
ECHO OFF
CLS
DAYTIME.COM
YAPP.COM
CLS
DIR
<CTRL Z>
The above example should be typed in from the DOS prompt and the
batch file should be located on the same disk that contains the DAYTIME.COM
and YAPP.COM files (or what ever communications program you are using...)
Using the above example, when you type 'YAPP', you will see the
DAYTIME.COM screen come up and the TNC,s clock will now be set. Pressing any
key will cause YAPP.COM to come up and load. As an added bonus, when you leave
the Yapp program, the screen will clear and a disk directory will appear. This
is due to the last two lines of the batch file.
If your using some other communications program other than YAPP
simply substitute the file name of that program in place of YAPP.COM...
How the program works
---------------------
DAYTIME.COM uses DOS interrupts to check the real time
clock in the IBM computer. These interrupts return the
year,month,day and time in various registers of the
8088/80286 microprocessor. The values returned in these
registers are in binary. The program then converts these
binary values to "Unpacked B.C.D." and then finally converts
these numbers to their ASCII equivalents. Once converted to
their ASCII equivalents, these numbers are stored in a buffer
inside the computer for future use.
The program then issues the TAPR command 'DAYTIME'
followed by a space (20 HEX) to the TNC via the serial port.
Next the program spits out the data in the afore-mentioned
buffer. As an example the data stream might look like this:
DAYTIME 8808292310
In this example we would have just set the real time
clock in the TNC to a date of August 29,1988 and the time to
2310.
The program also displays the time and date on the
screen just to let you know that it has in fact done its job!
Finally the program sounds a bell and waits for keyboard
input. Once the program senses keyboard input the program
terminates and returns to DOS. If the program was executed
from inside a batch file then the next command in the batch
file will be executed once the program has terminated. (I.E.
next line could be used to tell the computer to load a
communications program such as YAPP.COM.
To take advantage of the real time clock feature you
must have the commands CONSTAMP,MSTAMP and or DAYSTAMP
turned on in your TNC. This will allow time and date stamping
of connected and or unconnected packets.
I suggest you read the section in your TNC,s manual that
deals with the commands DAYTIME,CONSTAMP,MSTAMP and DAYSTAMP.
Changing parameters
-------------------
The program as supplied is set up to communicate with
the TNC at 1200 Baud,8 Bit words,No Parity,1 Stop bit
which is the most popular combination The program is also
set up to communicate via comm port number 1.
There is no provision to change these parameters from
within the program. However I have included the source code
DAYTIME.ASM. You can change the following equates in the
source code and re-assemble the program using the microsoft
macro assembler. The following information shows how to
change the program to run on comm port 2 and also shows you
how to set the program to other baud rates.
At the top of the source code listing you will see the
following equates:
BAUDRATE EQU 083H ;BAUD RATE SELECT
COMMPORT EQU 0 ;COMM PORT SELECT
ATTRIB EQU 07H ;VIDIO COLOR ATTRIBUTE
To change to comm port 2 change the '0' to a '1' and re-
assemble the source code..
To change the baud rate to other than 1200 baud, 8 bit words,
1 stop Bit No parity see the following chart..
300 Baud 8 Bit Words 1 Stop Bit No parity = 043H
1200 Baud 8 Bit Words 1 Stop Bit No parity = 083H
2400 Baud 8 Bit Words 1 Stop Bit No parity = 0A3H
4800 Baud 8 Bit Words 1 Stop Bit No parity = 0C3H
9600 Baud 8 Bit Words 1 Stop Bit No parity = 0E3H
Make the appropriate changes to the BAUDRATE EQU and then
re-assemble the code.
I have set the ATTRIB EQU to a "normal attribute" 07H.
I did this so as to insure compatibility with a monochrome
monitor.
If you have a color monitor, you can change this equate
to give the program some interesting colors.
Below is a short list of colors that I have found
pleasing to the eye..
00EH = Black background / Yellow foreground
00FH = Black background / Bright white foreground
00BH = Black background / Light cyan foreground
01FH = Blue background / Bright white foreground
Any comments/suggestions please feel free to write me.
Enjoy...
Richard Tashner N2EO
163-34 21 Road
Whitestone N.Y. 11357